package com.hhit.zhgd.controller

import com.hhit.zhgd.domain.dto.FrontAnalyzeReqDTO
import com.hhit.zhgd.domain.response.BaseResp
import com.hhit.zhgd.service.ZhgdAnalyzeService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/analysis/service")
class ZhgdAnalyzeController {
    @Autowired
    private var zhgdAnalyzeService: ZhgdAnalyzeService? = null

    @PostMapping("/frontAnalyse")
    fun frontAnalyse(@RequestBody frontAnalyzeReqDTO: FrontAnalyzeReqDTO): BaseResp<Any?> {
        return zhgdAnalyzeService?.frontAnalyze(frontAnalyzeReqDTO) ?: BaseResp.fail("服务异常")
    }
}